# This code is part of the MWP System
# Copyright (c) 2012 Benjamin Lubin (blubin@bu.com) 
# Published under and subject to the GPLv2 license available at http://www.gnu.org/licenses/gpl-2.0.html

'''
Created on Dec 14, 2012
@author: blubin
'''

from frontend.roleApplication import RoleApplication;
from frontend.form import Type;
from unique import UNIQUE;

class ArchitectApplication(RoleApplication):
    """ The Reception User Interface """

    def __init__(self):
        super(ArchitectApplication, self).__init__("construction"+UNIQUE, "Architect");
        self.register_transition_step("CreateBlueprint", self.create_blueprint_form_creator,name_fields=["sequence","FirstName","LastName"]);
        self.register_transition_step("SendBlueprintToGovt", self.send_blueprint_to_govt_form_creator,name_fields=["sequence","FirstName","LastName"]);        

    def create_blueprint_form_creator(self, stepname, form):
        form.add_html_label('<B>Enter information:</B>')
        form.add_field(Type.CHOICE, "BuildingType", labeltext="Building Type", choices=['Steel', 'Wood', 'Concrete'], initial='Steel');
        form.add_field(Type.INTEGER, "Rooms", labeltext="Number of Rooms", initial=10);
        form.add_field(Type.INTEGER, "BuildingHeight", labeltext="Building Height", initial=50);
        form.add_field(Type.CHOICE, "FloorPlan", labeltext="Floor Plan", choices=['Open', 'Closed'], initial='Open');
        form.add_field(Type.SHORTSTRING, "SpecialRequests", labeltext="Special Requests");
        
    def send_blueprint_to_govt_form_creator(self, stepname, form):
        form.add_html_label('<B>Send blueprint:</B>')
    
    
if __name__ == '__main__':
    app = ArchitectApplication();
    app.MainLoop();